package com.ccsoft.zknote.service;

import com.ccsoft.zknote.exception.ServiceException;
import com.ccsoft.zknote.pojo.User;

import java.util.List;
import java.util.Map;

/**
 * @author chanchaw
 * @create 2023-07-08 22:26
 */
public interface IUserService {
    Boolean isExists8Email(String email);
    /**
     * 传入邮箱+密码登录
     * @param email 邮箱账号
     * @param password 登录密码
     * @return {user: 用户信息,userToken:保存到 redis 的 token}
     */
    Map<String, Object> login(String email, String password) throws ServiceException;
    User register(String email, String vc,String vcTokenKey);
    void logout(String userToken);
    User get8Email(String email);
    List<User> getList();
    User insert(User record);
    User save(User record);
}
